home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Tool Chest / Development Tools & Languages / HyperCard Related / APDA HyperCard Toolkits / HyperCard Video Toolkit 2.0 / HVT #2 / Advanced Material / Video Sources / stopVideo.p < prev    next >
Encoding:
Text File  |  1995-02-07  |  1.1 KB  |  63 lines  |  [TEXT/MPS ]

  1. (*
  2.     stopVideo - Stop the player.
  3.  
  4.     To compile and link this file using Macintosh Programmer's Workshop,
  5.  
  6.         pascal -w stopVideo.p
  7.  
  8.         link -m ENTRYPOINT -o HyperCommands -rt XCMD=8008 -sn Main=stopVideo ∂
  9.             stopVideo.p.o "{MPW}"Libraries:interface.o "{MPW}"PLibraries:PasLib.o
  10.  
  11.     Copyright © 1987,88 Apple Computer, Inc.
  12.  
  13.     9/87 - Initial coding by Harry R. Chesley.
  14.     2/88 - Changed for new interface specification by Harry R. Chesley.
  15. *)
  16.  
  17. {$R-}
  18.  
  19. {$S stopVideo }     { Segment name must be the same as the command name. }
  20.  
  21. unit DummyUnit;
  22.  
  23. interface
  24.  
  25. uses MemTypes, QuickDraw, OSIntf, HyperXCmd;
  26.  
  27. procedure EntryPoint(paramPtr: XCmdPtr);
  28.     
  29. implementation
  30.  
  31. type
  32.  
  33. Str31 = String[31];
  34.  
  35. procedure stopVideo(paramPtr: XCmdPtr); forward;
  36.  
  37. procedure EntryPoint(paramPtr: XCmdPtr);
  38.  
  39.     begin
  40.         stopVideo(paramPtr);
  41.     end;
  42.  
  43. procedure stopVideo(paramPtr: XCmdPtr);
  44.  
  45.     {$I XCmdGlue.inc}
  46.  
  47.     procedure Fail(errMsg: Str255); { set theResult and quit }
  48.         begin
  49.             paramPtr^.returnValue := PasToZero(errMsg);
  50.             exit(stopVideo);
  51.         end;
  52.  
  53.     {$I VideoUtil.inc}
  54.  
  55.     begin
  56.         if paramPtr^.paramCount <> 0 then Fail('parameter count is not 0');
  57.  
  58.         { Stop the player... }
  59.         videoCmd('stop','');
  60.     end;
  61.  
  62. end.
  63.